from selenium.webdriver.common.by import By

from common.base_page import BasePage
from selenium import webdriver
driver=webdriver.Chrome()
basepage=BasePage(driver)

func=getattr(basepage,'open')
func('http://localhost/ecshop/user.php')

func=getattr(basepage,'input')
username_loc=(By.NAME,'username')
func(username_loc,'test01','登录页面_登录功能_用户名输入操作')


func=getattr(basepage,'input')
password_loc=(By.NAME,'password')
func(password_loc,'123456','登录页面_登录功能_密码输入操作')

func=getattr(basepage,'click')
sub_loc=(By.NAME,'submit')
func(sub_loc,'登录页面_登录功能_登录按钮点击操作')
